﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<Sisocana.Core.Models.ONGDefinidaModel>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    ONG Configuration
</asp:Content>

<asp:Content ID="Content4" ContentPlaceHolderID="HeaderContent" runat="server">
    <%--para el menu para el menu--%>
    	
    <link href="../../Content/tabbedContent.css" rel="stylesheet" type="text/css" />
	<script src="../../Scripts/tabbedContent.js" type="text/javascript"></script>
    <script src="<%: Url.Content("~/Scripts/jquery-ui-1.8.11.js") %>" type="text/javascript"></script>
    <link href="<%: Url.Content("~/Content/themes/base/jquery.ui.all.css") %>" rel="stylesheet" type="text/css" />

    <script language="javascript" type="text/javascript">
        $(document).ready(function () {
            $("p a, input:submit,input:file ").button();
        });
    </script>
</asp:Content>


<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

<h2>ONG Configuration</h2>
 <fieldset>
 <legend>
    <% Html.RenderPartial("MenuEditSite", ViewData["idSitio"]); %>
    </legend>
<p>
    <%: Html.ActionLink("Create New", "CreateONGD", new { id = ViewData["idSitio"] })%>
</p>
<% if (Model.Count() > 0){ %>
    <table>
        <tr>
            <th></th>
            <th>
                Name
            </th>
            <th>
                ONG
            </th>
            <th>
                Telephone
            </th>
            <th>
                State
            </th>
            <th>
                Paypal Login
            </th>
            <th>
                Paypal Partner
            </th>
        </tr>

    <% foreach (var item in Model) { %>
        <tr>
            <td>
                <%: Html.ActionLink("Edit", "updateONGD", new { id=item.id }) %> |
                <% if (item.estadoDefinido == "A") { %>
                    <%: Html.ActionLink("Disable", "changeStateONGD", new { id = item.id })%> |
                <%} %>
                <% else{ %>
                    <%: Html.ActionLink("Enable", "changeStateONGD", new { id = item.id })%>
                <%} %>
            </td>
            <td>
                <%: Html.DisplayFor(modelItem => item.nombreONGDefinida) %>
            </td>
             <td>
                <%: Html.DisplayFor(modelItem => item.ongName) %>
            </td>
            <td>
                <%: Html.DisplayFor(modelItem => item.telefono) %>
            </td>
            <td>
                <% if (item.estadoDefinido == "A") { %>
                    Active
                <%}  
                else 
                  { %>                    
                    Inactive
                <%} %>
            </td>
            <td>
                <%: Html.DisplayFor(modelItem => item.paypalLogin) %>
            </td>
            <td>
                <%: Html.DisplayFor(modelItem => item.paypalPartner) %>
            </td>
        </tr>
    <% } %>
    </table>

<% } else {%>
    <p> Currently there is no site in the system</p>
<% } %>
</fieldset>
</asp:Content>

